const OPEN_MODAL = 'OPEN_MODAL';
const ADD_LIST_ITEM = 'ADD_LIST_ITEM';

let openedIndex = 0;
export const openModal = (title, content) => ({
  type: OPEN_MODAL,
  index: openedIndex++,
  title,
  content
});
export const addListItem = (item) => {
  // let item1 = {...item, id: item.id + 1}
    return {
      type: ADD_LIST_ITEM,
      payload: item,
    }
};

// export const login = (username, pwd) => {
//
//   fetch()
//   return (dispatch) => {
//     dispatch(startLogin());
//
//   }
// }
